﻿#ifndef CONFIGFILE_H
#define CONFIGFILE_H

#include "oeasycommon.h"
#include <QString>
#include <QList>
#include <QMap>
#include <QMutex>
#include <QSettings>

#define OeasyKeyPath "/home/sd/.oeasy/oeasykey.ini"

class ConfigFile
{

public:
    //ConfigFile(const char *path = "oeasycfg.ini");
    static ConfigFile& getInstance();
    int SetConfig(STRUCT_OEASY_CONFIG);
    int SetSaveLogFile(QString & strFileName);
    bool isValid();
public:
    ConfigFile(const char *path = "oeasycfg.ini");
    STRUCT_OEASY_CONFIG m_cfg;
    QMap<int, QString> m_IpcMap;
    static ConfigFile* m_sconfig;
    static QMutex m_smutex;
private:
    QString cfgPath;
};

#define g_ConfigFile ConfigFile::getInstance()

#endif // CONFIGFILE_H
